package com.talos.ums.controller.admin.userloginhis.vo;

import com.talos.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.talos.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 用户登录历史记录表分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class UmsUserLoginHisPageReqVO extends PageParam {

    @Schema(description = "", example = "28230")
    private Long userId;

    @Schema(description = "")
    private String userCode;

    @Schema(description = "登录IP地址")
    private String ipAddress;

    @Schema(description = "登录时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] time;

    @Schema(description = "登录终端:APP,PC")
    private String terminal;

    @Schema(description = "是否登录成功: 0-失败,1-成功")
    private Integer success;

    @Schema(description = "登录失败编码")
    private String errorCode;

    @Schema(description = "登录失败原因")
    private String errorMsg;

    @Schema(description = "创建人工号")
    private String creatorCode;

    @Schema(description = "创建人姓名", example = "张三")
    private String creatorName;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "修改人工号")
    private String modifierCode;

    @Schema(description = "修改人姓名", example = "李四")
    private String modifierName;

    @Schema(description = "修改时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] modifyTime;

    @Schema(description = "租户id", example = "23607")
    private Long tenantId;

    @Schema(description = "登录姓名", example = "张三")
    private String userName;

    @Schema(description = "创建人id", example = "5192")
    private Long creatorId;

    @Schema(description = "修改人id", example = "21519")
    private Long modifierId;

}
